<script >
import {inject, readonly, shallowRef} from "vue";
export default {
  name:'Son',
  setup(){
    let car = inject('car')
    // let c = readonly(car)
    // console.log(c)
    return {car}
  }
}


</script>

<template>
  <div class="son">
    <h3>我是Son组件（孙）{{car.name}}--{{car.price}}</h3>

  </div>

</template>

<style scoped>
.son{
  background-color: orange;
  padding: 10px;
}
</style>